echo off

set SOLUTION_NAME=TennisSiteDefinition.wsp
set URL=%1

echo %time% Retracting Solution...
"c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\STSADM.EXE" -o retractsolution -name %SOLUTION_NAME% -immediate

_tools\custom_timeout 20

echo %time% Deleting solution...
"c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\STSADM.EXE" -o deletesolution -name %SOLUTION_NAME%

if %errorlevel% NEQ 0 (
goto :FAIL
)

goto :END

:FAIL
echo Operation failed :(

exit %errorlevel%

:END

echo SUCCESS!

exit %errorlevel%